package hzau.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import hzau.pojo.requestParams.CollegeRegisterParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class College implements Serializable {
    @TableId(type=IdType.AUTO)
    private Long id;
    private String name;
    private String pic;
    private Long universityId;
    Long presidentId;
    public College(CollegeRegisterParam collegeRegisterParam){
        this.name=collegeRegisterParam.getName();
        this.pic=collegeRegisterParam.getPic();
        this.universityId=collegeRegisterParam.getUniversityId();
        this.presidentId=collegeRegisterParam.getPresidentId();
    }
}
